package com.yj.controller;

import com.yj.Result.ResponseResult;
import com.yj.service.ActivityService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@Slf4j
@RestController
@RequestMapping("/app/activity")
public class ActivityController {
    @Autowired
    private ActivityService activityService;

    /**
     * 活动列表
     * @param requestData
     * @return
     */
    @PostMapping("/allActiveList")
    public ResponseResult allActiveList(@RequestBody Map<String, Object> requestData) {
        try {
            return activityService.allActiveList(requestData);
        } catch (Exception e) {
            e.printStackTrace();
            return ResponseResult.okResult(200, "Server Error:"+e.getMessage());
        }
    }

}
